package com.longcai.piaojia;

import android.content.Context;

import com.zcx.helper.app.AppApplication;
import com.zcx.helper.app.AppPreferences;

/**
 * Created by Administrator on 2016/3/14.
 */
public class BasePreferences extends AppPreferences {

    public BasePreferences(AppApplication context, String name) {

        super(context, name);

    }

    public void saveIsGuide(boolean isGuide){

        putBoolean("isGuide", isGuide);

    }

    public boolean readIsGuide(){

        return getBoolean("isGuide", false);

    }

    public void saveUserId(String userId){

        putString("UserId", userId);

    }

    public String readUserId(){

        return getString("UserId", "");

    }

    public void saveIsLogin(boolean isLogin){

        putBoolean("IsLogin", isLogin);

    }

    public boolean readIsLogin(){

        return getBoolean("IsLogin", false);

    }

    public void saveIsFavourable(String isFavourable){

        putString("isFavourable", isFavourable);

    }

    public String readIsFavourable(){

        return getString("isFavourable", "");

    }

    public void saveUserAccount(String userAccount){

        putString("UserAccount", userAccount);

    }

    public String readUserAccount(){

        return getString("UserAccount", "");

    }

    public void saveSearch(String search){

        putString("search", search);

    }

    public String readSearch(){

        return getString("search", "");

    }

    public void saveCityName(String cityName){

        putString("CITY_NAME", cityName);

    }

    public String getCityName(){

        return getString("CITY_NAME", "");

    }

//    public void saveNoChangeCityName(String cityName) {
//
//        putString("NoChangeCityName", cityName);
//    }
//
//    public String getNoChangeCityName() {
//
//        return getString("NoChangeCityName", "");
//    }

    public void saveCityId(String cityId){

        putString("CITY_ID", cityId);

    }

    public String getCityId(){

        return getString("CITY_ID", "");

    }

    public void saveCustomServiceTel(String customServiceTel){

        putString("CUSTOM_SERVICE_TEL", customServiceTel);

    }

    public String readCustomServiceTel(){

        return getString("CUSTOM_SERVICE_TEL", "");

    }

    public void saveNoSeatServiceTel(String noSeatServiceTel){

        putString("NOSEAT_SERVICE_TEL", noSeatServiceTel);

    }

    public String readNoSeatServiceTel(){

        return getString("NOSEAT_SERVICE_TEL", "");

    }


    public void saveTeamBuyServiceTel(String teamBuyServiceTel){

        putString("TEAMBUY_SERVICE_TEL", teamBuyServiceTel);

    }

    public String readTeamBuyServiceTel(){

        return getString("TEAMBUY_SERVICE_TEL", "");

    }

    public void saveBackdrop(String backdrop){

        putString("BACKDROP", backdrop);

    }

    public String readBackdrop(){

        return getString("BACKDROP", "");

    }

}
